package cn.xopencode.recordservice.dal.mysql.mapper.sf6machine;

import cn.xopencode.mybatis.core.query.QueryWrapperX;
import cn.xopencode.recordservice.dal.mysql.dataobject.sf6machine.Sf6MachineRecordOtherDO;
import cn.xopencode.recordservice.service.sf6machine.bo.Sf6MachineRecordOtherPageBO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Repository;

@Repository
public interface Sf6MachineRecordOtherMapper extends BaseMapper<Sf6MachineRecordOtherDO> {

    default IPage<Sf6MachineRecordOtherDO> selectPage(Sf6MachineRecordOtherPageBO pageBO) {
        return selectPage(new Page<>(pageBO.getPageNo(), pageBO.getPageSize()),
                new QueryWrapperX<Sf6MachineRecordOtherDO>()
                        .betweenIfPresent("inspection_time",pageBO.getInspectionTime()+" 00:00:00",pageBO.getInspectionTime() +" 23:59:59"));
    }
}
